<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

// Route::get('/', function () {
//     return view('welcome');
// });

//登录注册

Route::group(['namespace' => 'Home'], function () {
    Route::get('/', 'IndexController@login');
    //登录
    Route::get('/login', 'IndexController@login');
    Route::post('/login_check', 'IndexController@login_check');

    Route::get('/test', 'IndexController@test');
    //注册

    Route::get('/register', 'IndexController@register');
    Route::get('/register/{code?}', 'IndexController@register');
    Route::post('/register_make', 'IndexController@register_make');
    Route::post('/send_code', 'IndexController@send_code');

    //忘记密码
    Route::get('/forget', 'IndexController@forget');
    Route::post('/forget_make', 'IndexController@forget_make');

    //测试

});

Route::group(['namespace' => 'Home', 'middleware' => 'login'], function ($route) {
    // 首页

    // 个人中心
    Route::get('center/index',  'CenterController@index');//个人中心
    Route::get('center/logout', 'CenterController@logout');//退出
    Route::get('center/invite', 'CenterController@invite');//邀请好友
    Route::get('center/my_wallet', 'CenterController@my_wallet');//我的资产
    Route::get('center/fund_detail', 'CenterController@fund_detail');//资金明细
    Route::get('center/withdraw/{status?}', 'CenterController@withdraw');//提现记录

    Route::get('center/my_task/{status?}', 'CenterController@my_task');//我的任务
    Route::get('center/my_invite', 'CenterController@my_invite');//我的邀请
    Route::get('center/my_info', 'CenterController@my_info');//我的信息
    Route::post('center/edit_info', 'CenterController@edit_info');//修改信息




    Route::get('center/apply_withdraw', 'CenterController@apply_withdraw');//申请提现
    
    Route::get('center/logout', 'CenterController@logout');//退出

    //任务大厅
    Route::get('/task/list', 'TaskController@getList');
    Route::get('/task/info', 'TaskController@getInfo');
    Route::post('/task/post_task', 'TaskController@postTask');//领取任务
    Route::post('/task/get_submit_step', 'TaskController@get_submit_step');//提交任务要求
    Route::post('/task/submit_task', 'TaskController@submit_task');//提交任务


    //加盟合作
    Route::get('/partner/add_partner', 'PartnerController@add_partner');


    
});
